package name.fowler.refactoring.simplestore;

import java.util.List;

public class DefaultFrequencyCalculator implements FrequencyCalculator{

	@Override
	public int getFrequencyPoint(List<Rental> movieRentals){
		int frequentRenterPoints = 0;
		for(Rental rental: movieRentals) {
			frequentRenterPoints++;
			// Add bonus for a two-day new-release rental
			if (rental.needAdditionalFrequentPoints())
			{
				frequentRenterPoints ++;
			}
		}
		return frequentRenterPoints;
	}

}
